﻿// ==================================================================================================
// Copyright(C) 2012 NCS Pte. Ltd. All rights reserved.
//
// SYSTEM NAME	    : iConnect .Net Application Framework
// COMPONENT ID	    : NCS.IConnect.Core
// COMPONENT DESC   : The foundation component of the whole framework. 	
//
// CREATED DATE/BY  : 13 Apr 2012 / Wu Yong Qing
//
// REVISION HISTORY :	
// DATE/BY			SR#/CS/PM#/OTHERS		DESCRIPTION OF CHANGE
// ==================================================================================================


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NCS.IConnect.Core.IoC.TransientCall
{
    /// <summary>
    /// Transient call interceptor interface.
    /// </summary>
    public interface ITransientCallInterceptor
    {
        /// <summary>
        /// Determines whether this instance can intercept the specified type.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <returns>
        ///   <c>true</c> if this instance can intercept the specified type; otherwise, <c>false</c>.
        /// </returns>
        bool CanIntercept(Type type);

        /// <summary>
        /// Creates the proxy.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="instanceProvider">The instance provider.</param>
        /// <returns>Transient call interceptor</returns>
        object CreateProxy(Type type, IInstanceProvider instanceProvider);
    }
}
